package com.maserb.monitor.entity.schoolConduct;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

//操行细则表
@Data
@Entity
@Table(name = "school_conduct_item")
@ExcelTarget("SchoolConductItemEntity")
public class SchoolConductItemEntity {
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    @Id
    private String id;
    //标题
    @Column (length = 1000)
    @Excel(name = "操行细则", orderNum = "1", width = 40,needMerge = true)
    @NotNull
    private String name;
    //类型（加分、减分）(1,"加分"),(2,"减分");
    private String type;
    //排序
    private int orderIndex;
    //分值
    @Excel(name = "分值", width = 20,orderNum = "3",needMerge = true)
    @Max(value = 100,message = "分值最大值不能超过100" )
    private Double score;
    //描述
    @Column (length = 400)
    private String description;
    //是否删除
    private String isDel;
    //状态
    private String status;
    private String createUser;
    private String createTime;
    private String updateUser;
    private String updateTime;

    //所属学校
    @Column(name = "school_id", length = 36)
    private String schoolId;
    @Column(name = "school_name", length = 50)
    private String schoolName;

}
